﻿function showAlert(msgtitle, msg, inttype) { 
    var iconname = "error";
    switch (inttype) {
        case 0:
            iconname = "error.gif";
            break;
        case 1:
            iconname = "success.gif";
            break;
        case 2:
            iconname = "alert.gif";
            break;
        case 8:
            iconname = "";
            break;
        default: 
            iconname = "prompt.gif";
            break;
    } 
    $.dialog({
        title: msgtitle,
        icon: iconname,
        content: msg,
        lock: true,
        ok: false 
    });

}

function showAlertUrl(msgtitle, msg, inttype, url) { 
    var iconname = "error";
    switch (inttype) {
        case 0:
            iconname = "error.gif";
            break;
        case 1:
            iconname = "success.gif";
            break;
        case 2:
            iconname = "alert.gif";
            break;
        default: 
            iconname = "prompt.gif";
            break;
    } 
    $.dialog({
        title: msgtitle,
        icon: iconname,
        content: msg,
        lock: true,
        ok: function () { 
            window.location.href = url;
            return false;
        }
    });

}
function ConfirmUrl( msg) { 
    $.dialog({
        title: '确认',
        icon: "prompt.gif",
        content: msg,
        lock: true,
        ok: function () { 
            return false;
        },
        cancel: true 
    });
}
function dgtips(msg) { 
    if (msg ==undefined)
    {
        msg = "数据加载中...";
    }
    $.dialog({
        id:"dialogtips",
        title: false,
        icon: "tips.gif",
        content: msg
    }); 
}
function closetips(tipid) {
    try
    {
        if (tipid == undefined)
        {
            tipid = 'dialogtips';
        }
        $.dialog({ id: tipid }).close();
    }
    catch (e)
    { }
}
//信息显示
function infoshow(title, msg, width, heigth) {
    $.dialog({
        id: 'infoid',
        title: title,
        content: '<div style="color:red">'+msg+'</div>',
        width: width,
        heigth: heigth,
        lock: true        
    });
}
//导出数据
function exportfile() {
    $.dialog({
        id:'exportid',
        title: '导出选项',
        content: 'url:/html/export.html',
        width: 460,
        heigth:300,
        lock: true,
        max: false,
        min: false,
        ok: function () { 
            $("#exportemail").val($.dialog.list['exportid'].content.document.getElementById('txtEmail').value);
            //return false;
            return true;
        },
        cancel: true
    });
}
//*http://www.lhgdialog.com/demo/* 